package com.wkk.log.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author : WangKeKe
 * @date : 2020/9/28 18:18
 * Description : 日志展示dto
 */

@Data
@Accessors(chain = true)
@ApiModel(description = "用于给前端展示日志信息")
public class OperationDto {

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "操作者用户名")
    private String username;

    @ApiModelProperty(value = "操作内容")
    private String operation;

    @ApiModelProperty(value = "接口方法 路径+方法名")
    private String method;

    @ApiModelProperty(value = "操作参数信息")
    private String params;

    @ApiModelProperty(value = "操作耗时")
    private Long time;

    @ApiModelProperty(value = "操作者IP地址")
    private String ip;

    @ApiModelProperty(value = "操作是否成功")
    private String status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

}
